# -*- coding: utf-8 -*-
from application import app

from flask_debugtoolbar import DebugToolbarExtension
#
# toolbar = DebugToolbarExtension(app)

'''
拦截器处理 和 错误处理器
'''
from interceptors.Auth import *
from interceptors.errorHandler import *

'''
蓝图
'''
from controllers.index import index_page
from controllers.dingtalkconnector import connector_page
from controllers.member import member_page
from controllers.interview import interview_page
from controllers.reserve import reserve_page
from controllers.check import check_page
from controllers.formation import formation_page
from controllers.knowledge import knowledge_page
from controllers.resign import resign_page
from controllers.award import award_page
from controllers.project import project_page
from controllers.upload import upload_page
from controllers.it import it_page
from controllers.report import report_page
from controllers.salary import salary_page


app.register_blueprint(index_page, url_prefix="/api/")
app.register_blueprint(connector_page,url_prefix="/api/connector")
app.register_blueprint(member_page, url_prefix="/api/member")
app.register_blueprint(interview_page,url_prefix="/api/interview")
app.register_blueprint(reserve_page,url_prefix="/api/reserve")
app.register_blueprint(check_page,url_prefix="/api/check")
app.register_blueprint(formation_page,url_prefix="/api/formation")
app.register_blueprint(knowledge_page,url_prefix="/api/knowledge")
app.register_blueprint(resign_page,url_prefix="/api/resign")
app.register_blueprint(award_page,url_prefix="/api/award")
app.register_blueprint(project_page,url_prefix="/api/project")
app.register_blueprint(upload_page, url_prefix="/upload")
app.register_blueprint(it_page, url_prefix="/it")
app.register_blueprint(report_page, url_prefix="/api/report")
app.register_blueprint(salary_page,url_prefix="/api/salary")

'''
模板函数
'''
from common.libs.UrlManager import UrlManager

app.add_template_global(UrlManager.buildStaticUrl, 'buildStaticUrl')
app.add_template_global(UrlManager.buildUrl, 'buildUrl')
